
<!DOCTYPE HTML>
<html lang="zh-cn" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>开始 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Features.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="輸入並搜尋" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    总览
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="Getting-started.html">
            
                <a href="Getting-started.html">
            
                    
                    开始
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Features.html">
            
                <a href="Features.html">
            
                    
                    技术栈
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Structure.html">
            
                <a href="Structure.html">
            
                    
                    目录结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="development/">
            
                <a href="development/">
            
                    
                    深入了解
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="development/State-management.html">
            
                <a href="development/State-management.html">
            
                    
                    谈状态管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="development/URL-is-soul-of-SPA.html">
            
                <a href="development/URL-is-soul-of-SPA.html">
            
                    
                    URL 是单页应用的精华
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="development/Service-layer.html">
            
                <a href="development/Service-layer.html">
            
                    
                    引入服务层
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="development/Ajax-interface.html">
            
                <a href="development/Ajax-interface.html">
            
                    
                    Ajax 接口化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="development/Configuration.html">
            
                <a href="development/Configuration.html">
            
                    
                    配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="development/CORS-and-Proxy.html">
            
                <a href="development/CORS-and-Proxy.html">
            
                    
                    跨域与代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="development/Best-practice.html">
            
                <a href="development/Best-practice.html">
            
                    
                    最佳实践
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <a target="_blank" href="https://github.com/kenberkeley/vue-demo/issues">
            
                    
                    问题反馈（issues）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <a target="_blank" href="https://github.com/kenberkeley/vue-demo/releases">
            
                    
                    版本迭代（releases）
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本書使用 GitBook 釋出
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >开始</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#xA7;-&#x5F00;&#x59CB;">&#xA7; &#x5F00;&#x59CB;</h1>
<h3 id="&#x2299;-&#x9884;&#x5907;&#x77E5;&#x8BC6;">&#x2299; &#x9884;&#x5907;&#x77E5;&#x8BC6;</h3>
<p>&#x5728;&#x5F00;&#x59CB;&#x524D;&#xFF0C;&#x5E0C;&#x671B;&#x60A8;&#x5DF2;&#x901A;&#x8BFB;&#x5982;&#x4E0B;&#x8D44;&#x6599;&#xFF1A;</p>
<ul>
<li><a href="http://v1.vuejs.org/guide/" target="_blank">Vue.js 1.x Guide</a></li>
<li><a href="http://v1.vuejs.org/api/" target="_blank">Vue.js 1.x API</a></li>
<li><a href="https://github.com/vuejs/vue-router/tree/1.0/docs/zh-cn" target="_blank">Vue Router docs for Vue 1.x</a></li>
</ul>
<p>&#x540C;&#x65F6;&#xFF0C;&#x60A8;&#x8FD8;&#x9700;&#x8981;&#x719F;&#x6089; ES6&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x8BF7;&#x628A;&#x5982;&#x4E0B;&#x4EE3;&#x7801;&#x8F6C;&#x8BD1;&#x6210; ES5&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> foo = ({ hello: { world: bar } }) =&gt; ({ bar })
</code></pre>
<blockquote>
<p>&#x7B54;&#x6848;&#x8BF7;&#x5728; <a href="https://babeljs.io/repl" target="_blank">Babel REPL</a> &#x81EA;&#x884C;&#x9A8C;&#x8BC1;</p>
</blockquote>
<h3 id="&#x2299;-&#x5B89;&#x88C5;">&#x2299; &#x5B89;&#x88C5;</h3>
<blockquote>
<p><strong>&#x5F3A;&#x70C8;&#x5EFA;&#x8BAE;</strong>&#x5347;&#x7EA7;&#x5230; <code>node &#x2265; 6.x / npm &#x2265; 3.x</code> &#x73AF;&#x5883;<br><strong>&#x5F3A;&#x70C8;&#x63A8;&#x8350;</strong>&#x5F80;&#x540E;&#x4F7F;&#x7528; <code>cnpm</code> &#x66FF;&#x4EE3; <code>npm</code> &#x5B89;&#x88C5;&#x4F9D;&#x8D56;  </p>
<p>&#x8FD0;&#x884C; <code>npm set registry https://registry.npm.taobao.org</code> &#x6362;&#x6E90;<br>&#x5E76;&#x4E0D;&#x80FD;&#x89E3;&#x51B3; <code>node-sass</code> &#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x6E90;&#x7801;&#x5305;&#x4E0B;&#x8F7D;&#x6781;&#x6162;&#x7684;&#x95EE;&#x9898;</p>
</blockquote>
<pre><code>$ npm i cnpm -g       // &#x5168;&#x5C40;&#x5B89;&#x88C5; cnpm

$ git clone https://github.com/kenberkeley/vue-demo.git
$ cd vue-demo
$ cnpm i              // &#x5B89;&#x88C5;&#x672C;&#x9879;&#x76EE;&#x4F9D;&#x8D56;
</code></pre><h3 id="&#x2299;-&#x547D;&#x4EE4;">&#x2299; &#x547D;&#x4EE4;</h3>
<h4 id="&#x5F00;&#x53D1;">&#x5F00;&#x53D1;</h4>
<pre><code>$ npm start
</code></pre><p>&#x7F16;&#x8BD1;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x9ED8;&#x8BA4;&#x6D4F;&#x89C8;&#x5668;&#x5C31;&#x4F1A;&#x81EA;&#x52A8;&#x6253;&#x5F00; <code>localhost:8080</code><br>&#x82E5;&#x6D4F;&#x89C8;&#x5668;&#x6CA1;&#x6709;&#x81EA;&#x52A8;&#x5F39;&#x51FA;&#xFF0C;&#x5219;&#x8BF7;&#x81EA;&#x884C;&#x624B;&#x52A8;&#x8BBF;&#x95EE;</p>
<h4 id="&#x751F;&#x4EA7;">&#x751F;&#x4EA7;</h4>
<pre><code>$ npm run build
</code></pre><p>&#x7F16;&#x8BD1;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x5C06;&#x5728;&#x9879;&#x76EE;&#x6839;&#x76EE;&#x5F55;&#x751F;&#x6210; <code>dist/</code> &#x76EE;&#x5F55;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 总览">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Features.html" class="navigation navigation-next " aria-label="Next page: 技术栈">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"开始","level":"1.2","depth":1,"next":{"title":"技术栈","level":"1.3","depth":1,"path":"Features.md","ref":"Features.md","articles":[]},"previous":{"title":"总览","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"language":"zh-cn","gitbook":"*"},"file":{"path":"Getting-started.md","mtime":"2017-01-09T03:04:49.097Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-07T06:28:34.135Z"},"basePath":".","book":{"language":"zh-cn"}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

